import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'
import Home from '../layout/Home.vue'
import {routerList} from "./router_con"

Vue.use(VueRouter)

  const routes: Array<RouteConfig> = [
    
  {
    path: '/',
    name: 'Home',
    component: Home,
	  redirect: '/dashboard',
    children:routerList
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login.vue'),
	meta:{
		menuTitle:"登录"
	}
  },
  {
    path: '/echarts',
    name: 'echarts',
    component: () => import('../views/echarts/index.vue'),
  	meta:{
  		menuTitle:"echarts"
  	}
  },
 
  {
    path: '**',
    redirect: '/'
  },
 
]

const router = new VueRouter({
  mode: 'hash',
  // mode: 'history',
  base: "/ts/",
  routes
})

export default router
